home *** CD-ROM | disk | FTP | other *** search
/ Software Explosion / Software Explosion (Fore-Matt Home Computing)(1996).iso / system / c / finf.man < prev    next >
Text File  |  1996-09-08  |  14KB  |  397 lines

  1.  
  2. File INFo manual
  3. ================
  4.  
  5. File INFo V1.131         by Peter Struijk
  6.  
  7. Introduction
  8. ------------
  9.  
  10. FInf is a very versatile directory listing utility.  It can examine the
  11. contents of files and display a short type description.  In addition to
  12. this, FInf has a whole slew of options that allow you to filter files by
  13. type, date, age, size etc., as well as recursive directory descending,
  14. and adjustable output formatting.  So next to simply listing
  15. directories, FInf is extremely useful for creating hybrid commands that
  16. perform functions closely tuned to your specific needs.
  17.  
  18.  
  19.  
  20. Command Line Arguments
  21. ----------------------
  22.  
  23. Usage: FInf [file/dir] [-lf=LFORMAT ["..%s.."]] [-nl=NOLINE [prefix]]
  24.   [EXE] [IMP] [DOC] [IFF] [NOI] [-t=TYPE string] [-nt=NOTYPE]
  25.   [-na=NOANSI] [-nh=NOHEAD] [NEWER [object]] [OLDER [object]]
  26.   [-d=DIRS] [-f=FILES] [-q=QUICK] [-p=PATH] [-a=ALL] [NOX] [NOC]
  27.   [BLOCK(S)] [DATES] [-lt=LONGTYPE] [SUB string] [BATCH]
  28.   [LARGER size] [SMALLER size] [SINCE [n] date] [UPTO [n] date]
  29.   [-ho=HEADONLY]
  30.  
  31. Arguments surrounded by double-quotes are NOT recognized as keywords,
  32. this, or the use of -??  shortcuts can help you circumvent problems with
  33. identically named files and keywords.  Keywords/switches are case
  34. independent.
  35.  
  36. FInf parses its arguments in a left to right order, which may cause
  37. keywords to be overridden by keywords that occur later in the command
  38. line.  E.g.  "FInf -nt doc" displays only text files while "FInf doc
  39. -nt" will disable file type checking.
  40.  
  41. You may use the backslash "\" as a fixed escape character; If you enter
  42. \n it will be replaced by a new-line, while \" implements a
  43. double-quote.
  44.  
  45. FInf sets a returncode level of 20 (FAIL) on a serious error.  If no
  46. errors occur, yet no matching file can be found, a returncode 5 (WARN)
  47. will be set.
  48.  
  49.  
  50. Examples
  51. --------
  52.  
  53. In order to whet your appetite, I'll start with a few examples.  A
  54. complete option reference is given later on.
  55.  
  56. Typing "FInf" without any options will display the files in the current
  57. directory, e.g.
  58.  
  59. EM                         14228 --p-rwed 12-Jul-90 22:47:39 XLIB IMP
  60. TeX                       130344 ----rwed 04-Feb-90 19:29:42 EXECUTABLE
  61. Introduction                1918 ----rwed 21-Jul-90 15:23:12 ASCII TEXT
  62. Read Me                     1532 ----rwed 22-Jul-90 16:31:52 ASCII TEXT
  63. Graph                       4526 ----rwed 01-Jun-90 18:13:47 IFF PIC
  64. Tmp  (dir)
  65. 5 files - 1 directory - 307 blocks - 152548 bytes
  66.  
  67. Typing "FInf doc" will display all text files in the current directory,
  68. and "FInf disk* exe" will show all executables starting with "disk".
  69.  
  70. If you use a shell that supports unnamed pipes and aliases, you can very
  71. easily construct new commands as shown below.  If you do not have
  72. unnamed pipes, you can use the BATCH option, the PIPE:  device or
  73. temporary files to obtain equivalent though less elegant functionality.
  74.  
  75. The BATCH option will cause FInf to output to a temporary file and execute
  76. the contents like a batchfile once it's done.  This will give you the
  77. same functionality as single level unnamed pipes.
  78.  
  79. ------
  80. E=FInf [] noi doc path files lformat " \"%s\"" noline ED | execute
  81. or
  82. E=FInf [] noi doc path files lformat " \"%s\"" noline ED batch
  83.  
  84. This alias will execute the command ED with a list of text files that
  85. match any wildcards you specify. Typing "E" while in the directory shown
  86. above would have executed the command `Ed "Introduction" "Read Me"'.
  87. Note how escaping the quote character allows you to put quotes around
  88. the produced filename, thus avoiding problems with filenames that have
  89. spaces in them.
  90.  
  91. Do not be deterred by the numerous parameters. Aliases need to be
  92. constructed only once, and when you are examining the requirements of
  93. a new alias, you'll almost automatically conclude you're in need of
  94. certain options. Chances are FInf provides them.
  95.  
  96.  
  97. ------
  98.  
  99. find=FInf NOTYPE FILES QUICK NOHEAD NOANSI PATH ALL SUB []
  100.  
  101. or abbreviated:
  102.  
  103. find=FInf -nt -f -q -nh -na -p -a SUB []
  104.  
  105. This alias will search your current directory, and all subdirectories
  106. for filenames that contain a string you specify.  You can search any
  107. directory by specifying a directory name *after* the search string.
  108. Very useful for finding files on your harddrive.  If a matching file is
  109. found, the full path will be displayed.
  110.  
  111.  
  112. ------
  113. FInf *.c Quick Path All | Zoo aI <archive>
  114.  
  115. The I option in Zoo causes it to read filenames from the standard input,
  116. and these are provided by FInf.  This particular example will archive
  117. all C source files in the current directory and its subdirectories.
  118.  
  119.  
  120.  
  121. File Type Filtering Options
  122. ---------------------------
  123.  
  124. FInf has a set of command line switches that causes it to display
  125. only specific file types. Here's a list:
  126.  
  127.  
  128. -t=TYPE <string>
  129.  
  130. When FInf recognizes a file, it is able to print a string describing its
  131. type.  The TYPE option allows you to display only those files where the
  132. pattern <string> occurs in this file typeádescription.  This keyword can
  133. be used to select virtuallly any file type or groups of file types just
  134. by supplying a carefully chosen <string>.  Note that the LONGTYPE option
  135. causes FInf to search the extended file type description instead of
  136. searching the short description.
  137.  
  138. List of currently recognized file types:
  139.  
  140. The following list can be generated by "FInf ?" followed by another "?"
  141. at the ":" prompt.  FInf's file type recognition is not by any means
  142. complete and even a bit outdated but serves well to distinguish between
  143. major groups of files like e.g.  executables, text, iff.
  144.  
  145. SHORT         LONG
  146.  
  147. UNREADABLE    "Unable to read"
  148. UNKNOWN       "Unknown type"
  149. FIMP DATA     "FImp data file"
  150. OBJ CODE      "Linkable object code"
  151. TTW PIC       "TTW picture"
  152. PW DATA       "PowerWindows data"
  153. DIMP DATA     "DImp data file"
  154. IFF PIC       "IFF picture"
  155. IFF SOUND     "IFF sound"
  156. IFF SCORE     "IFF score"
  157. IFF TEXT      "IFF text"
  158. IFF DMS       "IFF Deluxe Music score"
  159. IFF ANI       "IFF animation"
  160. IFF S3D       "IFF Sculpt 3D scene"
  161. IFF DLV       "IFF Deluxe Video"
  162. IFF DOC       "IFF document"
  163. IFF FILE      "IFF data file"
  164. ASCII TEXT    "ASCII Text"
  165. OLD IMP       "Old imploded"
  166. NORM IMP      "Normal imploded"
  167. PURE IMP      "Pure imploded"
  168. OVLY IMP      "Overlayed imploded"
  169. XLIB IMP      "Library imploded"
  170. XLIB IMP!     "Short library imploded"
  171. EXECUTABLE    "Executable"
  172. OVERLAYED     "Overlayed executable"
  173. NORM IMP*     "Protected normal imploded"
  174. PURE IMP*     "Protected pure imploded"
  175. OVLY IMP*     "Protected overlayed imploded"
  176. XLIB IMP*     "Protected library imploded"
  177. FONT HDR      "Font header"
  178. WB ICON       "WB icon"
  179. DISK ICON     "WB disk icon"
  180. DRAWER        "WB drawer icon"
  181. TOOL          "WB tool icon"
  182. PROJECT       "WB project icon"
  183. GARBAGE       "WB garbage icon"
  184. DEVS ICON     "WB device icon"
  185. KICK ICON     "WB kick icon"
  186.  
  187.  
  188. In addition to filtering file types with the TYPE option there are a
  189. number of often used types that may be directly specified by keyword.
  190. These are:
  191.  
  192. EXE - Display executable files (except imploded executables).
  193. IMP - Display imploded files and imploded data files.
  194. DOC - Display ASCII text files.
  195. IFF - Display all kinds of IFF files. You may also use the TYPE keyword
  196.       to accomplish further differentation.
  197.  
  198.  
  199.  
  200. Other Filtering Options
  201. -----------------------
  202.  
  203. In addition to type filtering, FInf can also examine other properties
  204. with which to exempt certain files from being displayed:
  205.  
  206. NEWER <object>
  207. Display only objects which were created after or at the same time as
  208. <object>.
  209.  
  210. OLDER <object>
  211. Display only objects which were created before or at the same time
  212. as <object>.
  213.  
  214. UPTO <date>
  215. Display only those objects created UPTO a specified date. UPTO accepts
  216. three formats:
  217.     DD-MMM-YY
  218.     TODAY/YESTERDAY/TOMORROW/MONDAY...SUNDAY/FUTURE
  219.     [n] TICK(s)/SECOND(s)/MINUTE(s)/HOUR(s)/DAY(s)/WEEK(s)/MONTH(s)/YEAR(s)
  220. The integer [n] is optional, default is 1. The latter option is
  221. extremely handy to cleanup your news directory.
  222. E.g. FInf NEWS: -a -p -lf "Delete %s" UPTO 8 WEEKS BATCH
  223. Make sure that your system clock contains the correct time! :-)
  224.  
  225. SINCE <date>
  226. Display only object since a specified date. For information on the date
  227. formats see UPTO.
  228.  
  229. LARGER <integer>
  230. Display only files with a size smaller than or equal to <integer> bytes.
  231.  
  232. SMALLER <integer>
  233. Display only files with a size smaller or equal than <integer> bytes.
  234.  
  235. SUB <string>
  236. Display only objects containing at least one occurance of <string> in their
  237. objectname.
  238.  
  239. NOI
  240. Do not display .info files.
  241.  
  242. -d=DIRS
  243. Display directories only.
  244.  
  245. -f=FILES
  246. Display only files.
  247.  
  248. -a=ALL
  249. Recursively displays the contents of any subdirectories in addition to
  250. the files/dirs in the current directory.  Wildcards in the path description
  251. are not supported (yet), so for now this option will cause FInf to
  252. recursively enter ALL encountered directories.
  253.  
  254.  
  255.  
  256. Formatting Options
  257. ------------------
  258.  
  259. These switches and keywords control the way in which FInf generates its
  260. output:
  261.  
  262.  
  263. BATCH
  264.  
  265. This will capture FInf's output into a uniquely named temporary file in
  266. the T: directory, and subsequently will execute the file as a batch file
  267. that will be deleted after completion.
  268. This option is handy if you don't have unnamed pipes and something like
  269. the ARP execute command which will execute any commands piped to it.
  270.  
  271.  
  272. BLOCK=BLOCKS
  273.  
  274. This switch will cause FInf to display the number of blocks files occupy
  275. on disk instead of their lengths.  Note that for devices using the fast
  276. filing system, this value will include any extension blocks.
  277.  
  278.  
  279. DATES
  280.  
  281. This will cause FInf to print absolute dates instead of dates with
  282. "Yesterday" of "Sunday" in them.
  283.  
  284.  
  285. -lt=LONGTYPE
  286.  
  287. If specified, FInf will generate listings with a more verbose type
  288. description.  In order to create printing space for this, the date and
  289. protection flags will not be displayed.
  290.  
  291.  
  292. -nt=NOTYPE
  293.  
  294. If you use this switch, the contents of files will not be examined.  The
  295. type description will therefore not be displayed.  The EXE, IMP, DOC,
  296. IFF etc.  filters won't work if NOTYPE is set.  NOTYPE will cause FInf
  297. to operate about twice as fast because of the decreased amount of work
  298. it has to do for each file.
  299.  
  300.  
  301. -na=NOANSI
  302.  
  303. This surpresses the generation of ANSI codes used by FInf to select bold
  304. or italic font styles in the footer and such.
  305.  
  306.  
  307. -nh=NOHEAD
  308.  
  309. Like with the normal List command, NoHead will stop FInf from generating
  310. headers/footers with additional information on the examined files.
  311.  
  312. -ho=HEADONLY
  313.  
  314. This option is included to quickly simulate the unix DU command.
  315. DU stands for Directory Usage, an example alias:
  316. du = finf -ho -a []
  317.  
  318.  
  319. NOX
  320.  
  321. This option removes extensions from the filenames.  This might be handy
  322. when you only wish to pass the filename root into the LFormat output.
  323. E.g.  FInf *.twiddle NOX LFormat "Rename %s.twiddle %s.twaddle" |
  324. execute changes all .twiddle extensions into .twaddle extensions.
  325.  
  326.  
  327. NOC
  328.  
  329. This simple option tells FInf to NOT print any filenotes (comments)
  330. which might be attached to a file or directory.  Note that when the
  331. QUICK option is in effect filenotes are already been ignored.
  332.  
  333.  
  334. -q=QUICK
  335.  
  336. In quick mode, FInf will display only filenames and any paths.  No
  337. lengths, flags, dates, comments or types will be printed, the type
  338. filter switches will still function though.  These bare (path+)file
  339. names can be more readily used by programs you intend to feed FInf's
  340. output to.
  341.  
  342.  
  343. -p=PATH
  344.  
  345. If set, a full path will be pasted in front of any displayed filenames.
  346. This option is useful e.g. in conjunction with the LFormat or ALL
  347. switches.
  348.  
  349.  
  350. -lf=LFORMAT <"...%s...%s...">
  351.  
  352. Works like List's LFormat option.  Briefly, you can specify a string
  353. with a "%s" in it (up to 8 %s expansions are supported), and where FInf
  354. normally would have printed paths+file names, it displays the given
  355. string with the path + file at the %s location.  Useful for pasting
  356. commands in front of filenames so you can pipe the output of FInf to a
  357. batchfile, or directly to execute (if your shell supports this).  E.g.
  358. FInf LFORMAT "rename \"%s\" \"%s.doc\"" FILES DOC BATCH will append a
  359. ".doc" extension to all ASCII files found.  Note:  LFormatáautomatically
  360. causes the Quick, NoAnsi and Nohead switch modes to be selected.
  361.  
  362.  
  363. -nl=NOLINE [prefix]
  364.  
  365. This causes FInf not to print linefeeds between filenames.  If you use
  366. this together with a LFormat " %s" and a QUICK switch, you'll get a line
  367. with file names separated by spaces.  In the prefix position you may
  368. optionally specify a string to be pasted in front of this line.  This
  369. will probably be the name of a command which requires a list of
  370. filenames as its parameters.  Note that this line will only be printed
  371. if any filenames matching your wildcard specification were found.  E.g.
  372. FInf NOLINE "Ed " LFORMAT "\"%s\" " PATH FILES
  373. will produce something like:  Ed "ram:file1" "ram:doc1" "ram:readme"
  374.  
  375.  
  376. General Information
  377. -------------------
  378.  
  379. This program is Freely-Distributable, as opposed to Public Domain.
  380. Permission is given to freely distribute this program provided you
  381. include this documentation and any other related files, and no fee is
  382. charged in excess of reasonable media and mailing costs.
  383.  
  384. Currently FInf supports the #,?  and * wild cards.  OS 2.0 wildcarding
  385. will be implemented sometime in the future.  Also high on the wish list
  386. is a SORT option switch.  If, during normal operation, there is only one
  387. file matching the file/wildcard specification, and it is a program file,
  388. some additional information about the number of hunks and the memory usage
  389. will be displayed.  FInf has a lot of switches, so there's a chance that
  390. you might want to examine a file or directory that has the same name as
  391. one of these switches.  You can inform FInf that the object you
  392. specified isn't a switch by putting quotes "" around it.
  393.  
  394. FInf is pure and can be made resident.  Enjoy.
  395.  
  396.  
  397.